package com.ysd.lis.controller.sys;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.SysFlowDefinition;
import com.ysd.lis.request.SysFlowParam;
import com.ysd.lis.service.SysFlowDefinitionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 员工表
 * 前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-04-01
 */
@Api(tags = "流程定义")
@RestController
@RequestMapping("/api/sys/flowDefinition")
public class SysFlowDefinitionController extends BaseController {

    @Autowired
    SysFlowDefinitionService sysFlowDefinitionService;
    @ApiOperation("查询")
    @GetMapping("/findDefinitionList")
    public Result findDefinitionList(SysFlowParam param){
        return sysFlowDefinitionService.findDefinitionList(param);
    }

    @ApiOperation("新增")
    @PostMapping("/addDefinition")
    public Result addDefinition(@RequestBody SysFlowDefinition definition){
        return  sysFlowDefinitionService.addDefinition(definition);
    }

    @ApiOperation("修改")
    @PostMapping("/editDefinition")
    public Result editDefinition(@RequestBody SysFlowDefinition definition) {
        return sysFlowDefinitionService.editDefinition(definition);
    }

    @ApiOperation("根据详情id删除详情数据")
    @PostMapping("/deleteDefinition")
    public Result deleteDefinition(@RequestBody SysFlowDefinition definition) {
        return sysFlowDefinitionService.deleteDefinition(definition);
    }



}
